package xuanke;
		public class Teacher {
		    private String id;          // 教师编号
		    private String name;        // 教师姓名
		    private String gender;      // 教师性别
		    private Course course;      // 所授课程
		    
		    // 构造方法
		    public Teacher(String id, String name, String gender) {
		        this.id = id;
		        this.name = name;
		        this.gender = gender;
		    }
		    
		    // getter和setter方法
		    public String getId() { return id; }
		    public void setId(String id) { this.id = id; }
		    
		    public String getName() { return name; }
		    public void setName(String name) { this.name = name; }
		    
		    public String getGender() { return gender; }
		    public void setGender(String gender) { this.gender = gender; }
		    
		    public Course getCourse() { return course; }
		    public void setCourse(Course course) { this.course = course; }
		    
		    // 授课方法
		    public void teach() {
		        System.out.println(name + "老师正在讲授" + course.getCourseName() + "课程");
		    }
		    
		    // 查询授课信息
		    public void queryTeachingInfo() {
		        System.out.println("教师编号：" + id);
		        System.out.println("教师姓名：" + name);
		        System.out.println("所授课程：" + course.getCourseName());
		    }
		}		
